Skip to content

Conversation

@Potxssium
Copy link

###Authors

Guillaume Raschia - Polytech Nantes, LS2N
Alan Petit - Polytech Nantes
Théophile Tagne - Polytech Nantes

General description

This PR implements three new methods for the SetPartition class:

  • entropy(base=2): Computes the Shannon entropy based on block sizes.
  • characteristic_vector(): Returns the boolean vector of the equivalence relation (formerly assoc).
  • diff(other): Returns blocks of self not contained in blocks of other.

###References

  • diff: Based on the work of Hugo Dominguez (Polytech Nantes, 2021-2022) and the PhD Thesis of F. Dumonceaux (Nantes Université).
  • entropy: C. E. Shannon (1948), "A Mathematical Theory of Communication". Computed on the block size distribution.
  • characteristic_vector: Standard characteristic vector of the partition's equivalence relation (see W. M. Rand, 1971, JASA).

###Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

Closes #41556

@mantepse mantepse self-assigned this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SetPartition - entropy calculation, differential operation, association matrix

2 participants